package com.runa.rccprotocol.dto.param;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 抄表周期
 */
@Data
public class MeterReadingCycle extends Param {
    public MeterReadingCycle(int period) {
        this.period = period;
    }

    private int period;

    private int timeoutRatio;

    private float copyReadLatency;

    public byte[] toBytes() {
        byte[] bs = new byte[4];
        bs[0] = (byte) period;
        bs[1] = (byte) 0;
        bs[2] = (byte) 20;
        bs[3] = (byte) 0;
        return bs;
    }

}
